# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>

pkgname=hcxdumptool
pkgver=6.3.2
pkgrel=1
pkgdesc='Small tool to capture packets from wlan devices'
url='https://github.com/ZerBea/hcxdumptool'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('glibc' 'openssl')
source=(https://github.com/ZerBea/hcxdumptool/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        https://github.com/ZerBea/hcxdumptool/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.asc)
sha512sums=('cf0e874253443a40a87797a2f6e575e93d9b143acc10b37d9684088d937d0a0840980c74e2dc872aa3d978de3d8ebd8de821f84895bbb4cc8cceeb78935bdeaa'
            'SKIP')
b2sums=('ed0e62d5dc3442eb938df90bfa391ad56c4bad818830228f48d5b2133843e34c35e874af0099373feeb6da57b411758e9b9d55ea4ba29b731864db374aeb096f'
        'SKIP')
validpgpkeys=('5920CE1C567948AFD2C0A9B7375516A45DB88630') # ZeroBeat <ZeroBeat@gmx.de>

build() {
  cd ${pkgname}-${pkgver}
  CFLAGS+=" $LDFLAGS" \
  make PRODUCTION=1
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" PREFIX=/usr PRODUCTION=1 install
  install -Dm 644 README.md changelog -t "${pkgdir}/usr/share/doc/${pkgname}"
  install -Dm 644 license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim: ts=2 sw=2 et:
